home *** CD-ROM | disk | FTP | other *** search
- You are looking at the Origami generic Emacs-mode tutorial.
-
- This tutorial attempts to help you "learn by doing". The characters ">>" at
- the left margin of your screen indicate directions for you to try using a
- command.
-
- Origami commands generally involve the CONTROL key (sometimes labelled CTRL
- or CTL) or the META key (generally labelled ESCAPE). Rather than write out
- CONTROL or META each time we want you to prefix a character, we'll use the
- following abbreviations:
-
- C-<chr> Hold the CONTROL key while pressing the character <chr>.
- Thus, C-F would be: hold the CONTROL key and press F.
-
- M-<chr> Press the ESCAPE key and release it, then press the
- character <chr>. Note: All command treated in this tutorial
- will have the same meaning for upper or lower case characters
- (<chr>). They will be written in lower case characters.
-
- >> Now type C-V (View Next Screen) to move to the next screen.
- Remember: hold the CONTROL key and press V once.
-
- There is also a META-CONTROL combination:
-
- M-C-<chr> Press the ESCAPE key and release it, then hold the CONTROL key
- while pressing the character <chr>.
-
-
- IMPORTANT NOTE: If you must exit at some point, type C-X C-C.
-
- For the time being, you'll be expected to type C-V whenever you finish reading
- the current screen.
-
- Note that there is an overlap when going from screen to screen; this provides
- some continuity when moving through the file.
-
- The first thing that you need to know is how to move around from place to
- place in the file. You already know how to move forward a screen with C-V.
- To move back a screen, type M-v.
-
- >> Try typing M-v and then C-V to move back and forth between screens a few
- times.
-
-
- SUMMARY
- -------
-
- The following commands are useful for viewing screens:
-
- C-V Move forward one screen
- M-v Move back one screen
- C-L Clear screen and redisplay everything, putting the text
- near the cursor at the center of the screen.
-
- >> Find the cursor and remember what text is near it. Type an C-L.
- Find the cursor again and see what text is near it now.
-
-
- BASIC CURSOR CONTROL
- --------------------
-
- Getting from screen to screen is useful, but how do you reposition yourself
- within a given screen to a specific place? There are several ways you can
- do this. One way (not the best, but the most basic) is to use the commands
- previous, backward, forward and next. As you can imagine these commands
- (which are given to Origami as C-P, C-B, C-F, and C-N respectively) move the
- cursor from where it currently is to a new place in the given direction.
- Here, in a more graphical form, are the commands:
-
- Previous line, C-P
- :
- :
- Backward, C-B .... Current cursor position .... Forward, C-F
- :
- :
- Next line, C-N
-
- You'll probably find it easy to think of these by letter. P for previous,
- N for next, B for backward and F for forward. These are the basic cursor
- positioning commands and you'll be using them ALL the time so it would be
- of great benefit if you learn them now.
-
- >> Do a few C-N's to bring the cursor down to this line.
-
- >> Move into the line with C-F's and then up with several C-P's. Note what
- C-P does when the cursor is in the middle of the line.
-
- >> Try C-B at the beginning of a line. Note what happened to the cursor.
- Do a few more C-B's. Then do C-F's back to the end of the line and beyond.
-
- When you go off the top or bottom of the screen, the text beyond the edge is
- shifted onto the screen so that your instructions can be carried out while
- keeping the cursor on the screen.
-
- >> Move the cursor off the bottom of the screen with C-N's and see what
- happens. Note the new position of the cursor.
-
- If moving by characters is too slow, you can move by words. M-f moves
- forward a word and M-b moves back a word.
-
- >> Type a few M-f's and M-b's. Intersperse them with C-F's and C-B's.
-
- Notice the parallel between C-F and C-B on the one hand, and M-F and M-B on
- the other hand. Very often META characters are used for operations related
- to English text whereas CONTROL characters operate on the basic textual units
- that are independent of what you are editing (characters, lines, etc.).
-
- Two other commands which are useful are C-A and C-E. These commands move the
- cursor to the beginning (C-A) and the end (C-E) of the line.
-
- >> Try a couple of C-A's, and then a couple of C-E's. Note that the cursor
- does not move when either of these commands is repeated continuously.
-
- Two other simple cursor motion commands are M-< (less than), which moves to
- the beginning of the entered fold, and M-> (greater than), which moves to
- the end of the entered fold. If you need the shift key to type a "<", then
- you must also use the shift key to type M-<. Otherwise, you would be typing
- M-, (depending on your keyboard).
-
- The location of the cursor within the text is also called "point". To
- paraphrase, the cursor shows on the screen where point is located in the
- text.
-
- Here is a summary of simple moving operations, including the word and
- line moving commands:
-
- C-F Move forward a character
- C-B Move back a character
-
- M-f Move forward a word
- M-b Move back a word
-
- C-N Move to next line
- C-P Move to previous line
-
- C-A Move to beginning of line
- C-E Move to end of line
-
- M-< Go to beginning of file
- M-> Go to end of file
-
- >> Try all of these commands now a few times for practice as these are
- the most often used commands. Since the last two will take you away
- from this screen, use C-V's and M-v's to return here.
-
- Like all other commands in Origami, these commands can be given arguments
- which cause them to be executed repeatedly. The way you give a command
- a repeat count is by pressing META (ESC) and then the number before you
- enter the command.
-
- For instance, M-8 C-F moves forward eight characters.
-
- >> Try giving a suitable argument to C-N or C-P to come as close as you
- can to this line in one jump.
-
- This also applies to the screen moving commands, C-V and M-v. When given
- an argument, they scroll the screen up or down by that many screens.
-
- >> Try typing ESC-3 C-V now.
-
- If you would like to scroll up, you can give an argument to M-V.
-
-
- FOLDS
- -----
-
- Origami is a folding editor. Now is the time when you will get familiar with
- folds. If a fold is closed, the first text in the fold header are three dots,
- followed by two blanks. A fold can be opened with C-O. The beginning of the
- fold header changes from the three dots to three opening curly braces. The end
- of the fold is marked by three closing curly braces. You can close a open fold
- with C-C.
-
- >> Go two lines below and type C-O
-
- {{{ This is the fold header
- These are the contents of this fold.
-
- >> Type C-C to close it.
- }}}
-
- Another way to edit the contents of a fold is to enter it. Entering is done
- by M-C-O. Such a fold can be exited with M-C-O.
-
- >> Move the cursor to the fold below and type M-C-O
-
- {{{ Another fold
- >> Type M-C-C to exit this fold.
- }}}
-
- Folds are created with M-C-N.
-
- >> Move the cursor at the beginning of this line and type M-C-N once to mark
- the beginning of the fold at this line. Move the cursor below this line
- to mark the end and type M-C-N again. The new fold will be closed.
-
- >> Write somthing at the fold header. Remember, that you can write two
- characters right from the three dots.
-
- >> To unfold this fold, type C-U while the cursor is on the closed fold.
-
- The folds above contain text in this file. Another kind of folds contains
- text of other files. These folds are called file-folds. You can not open
- file-folds, only entering them is possible.
-
- >> The next chapters are file-folds. They begin with ...F and the name of
- the chapter. Enter then with M-C-O and exit them with M-C-C.
- Move the cursor two lines down and enter the file-fold of the
- abort chapter.
-
- {{{F abort
- :::F abort
- }}}
-
- {{{F errors
- :::F errors
- }}}
-
- {{{F keys
- :::F keys
- }}}
-
- {{{F modes
- :::F modes
- }}}
-
- {{{F editing
- :::F editing
- }}}
-
- {{{F search
- :::F search
- }}}
-
- {{{F files
- :::F files
- }}}
-
-
- CONCLUSION
- ----------
-
- Remember: To EXIT use C-X C-C.
-
- This tutorial is meant to be understandable to all new users, so if you
- found something unclear, don't sit and blame yourself - complain!
- Note that it does not explain every capability of Origami, only those you
- need to know for usual work. I still suggest reading the manual.
-
- You'll probably find that if you use Origami for a few days you won't be
- able to give it up. Initially it may give you trouble. But remember,
- this is the case with any editor, especially one that can do many, many
- things - and Origami can do practically everything.
-